// The margin between two sections
$margin-promotion-sections: 50px;
$margin-promotion-sections-small: 15px;

.docs-header-background {
  overflow: hidden;
  position: relative;
  height: 420px;
}

.docs-header-background::before {
  content: '';
  position: absolute;
  background-image: url('../../../assets/img/homepage/angular-white-transparent.svg');
  background-size: 600px;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-repeat: no-repeat;
  background-position: 80% 20px;
  opacity: 0.2;
}

.docs-header-section {
  width: 90%;
  position: absolute;
  z-index: 0;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.docs-header-headline {
  h1 {
    font-size: 56px;
    font-weight: bold;
    line-height: 56px;
    margin: 15px 5px;
  }

  h2 {
    font-size: 20px;
    font-weight: 300;
    line-height: 28px;
    margin: 15px 0 25px 0;
  }
}

.docs-homepage-promo {
  align-items: center;
  display: flex;
  flex-direction: column;
  padding: 16px;

  a {
    text-decoration: none;
  }

  h2 {
    font-size: 25px;
    font-weight: 400;
    margin: 16px 0;
    padding: 0;
  }

  p {
    font-size: 16px;
    font-weight: 400;
    line-height: 28px;
    margin: 0 0 24px 0;
    padding: 0;
  }

  mat-divider {
    width: 75%;
  }

  mat-icon {
    vertical-align: middle;
  }
}

.docs-homepage-row {
  width: 75%;
  display: flex;
  flex-direction: row;
  margin: $margin-promotion-sections 0;
}

.docs-homepage-carousel-row {
  margin: $margin-promotion-sections 0;
  width: 75%;
  display: flex;
  flex-direction: column;

  a.docs-link {
    width: 100%;
    text-align: right;
  }

  h2 {
    margin-top: 0;
  }
}

.docs-homepage-guides {
  .docs-homepage-guides-card-divider {
    width: 30%;
    height: 5px;
    margin: 15px auto;
  }

  .docs-homepage-guides-carousel-item {
    padding: 15px;
    display: flex;
    text-decoration: none;
  }

  .docs-homepage-guides-card.mat-card {
    text-align: center;
  }

  .docs-homepage-guides-card .mat-card-title {
    height: 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
  }
}


.docs-homepage-featured-components {
  .docs-featured-components-carousel-item {
    padding: 15px;
    text-align: center;

    .docs-homepage-img-container {
      overflow: hidden;
      width: 259px;
      height: 144px;
      margin-bottom: 10px;
    }

    img {
      transition: 0.3s ease-in-out;
      width: 100%;
    }
  }
}

.docs-homepage-row-column {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  width: 30%;
}

.docs-header-start {
  text-align: center;
  margin: $margin-promotion-sections 0 0 0;

  .mat-raised-button {
    font-size: 15px;
  }
}

@media (max-width: 1200px) {
  .docs-header-background {
    height: 330px;
  }
  .docs-header-background:before {
    background-image: none;
  }
}

@media (max-width: 850px) {

  .docs-header-background:before {
    background-image: none;
  }
  .docs-introduction {
    flex-direction: column;
  }

  .docs-homepage-row-column {
    width: 100%;
  }
}

/**
  * Rules for when the device is detected to be a small screen.
  */
@media (max-width: 720px) {

  .docs-header-start {
    margin: $margin-promotion-sections-small 0 0 0;
  }

  .docs-homepage-row, .docs-homepage-carousel-row {
    margin: $margin-promotion-sections-small 0;
  }
}
